import { CHANGE_BANNERS, CHANGE_RECOMMENDS } from './contants'

const initialState = {
  banners: [],
  recommends: []
}

function reducer(state = initialState, action) {

  switch (action.type) {
    case CHANGE_BANNERS:
      return {...state, banners: action.banners}
    case CHANGE_RECOMMENDS:
      return {...state, recommends: action.recommends}
    default:
      return state;
  }
  
}

export default reducer